<form action="<?php echo $form->getObject()->isNew() ?
        url_for("create_action", array('adventure_id' => $ktd_adventure->getId()))
        :
        url_for("update_action", array('id'=> $ktd_action->getId()))
  ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
<?php foreach($form as $widget): ?>
<?php if($widget->getName() != "_csrf_token"): ?> <br/>
<?php echo $widget->renderLabel();?>
<div class="in">
    <?php echo $widget->render(); ?>
    <?php if($widget->renderError() != NULL):?>
    <div class="ui-state-error">
        <?php echo $widget->renderError() ?>
    </div>
    <?php endif;?>
</div>
<?php endif;?>
<?php endforeach; ?>
<br/>
 <input class="btn primary" type="submit" value="Envoyer" />
</form>
